package com.example.demo.entity.vo;

import com.example.demo.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author chen huilong
 * @data 2022/10/4
 */
@Data
public class LoginOutput {

    @ApiModelProperty(value = "用户名")
    public String name;

    @ApiModelProperty(value = "用户性别")
    public String gender;

    @ApiModelProperty(value = "宿舍号")
    public String roomId;

    @ApiModelProperty(value = "队伍号")
    public Long groupId;

    @ApiModelProperty(value = "角色")
    public String role;



    public void of(User user) {
        this.setName(user.getUserName());
        this.setGender(user.getGender());
        this.setRoomId(user.getRoomId());
        this.setGroupId(user.getGroupId());
        this.setRole(user.getUserRole());
    }

}
